all : 
	@echo "\tCompilando funções de leitura e escrita em ficheiros -> Alunos"
	make parser
	make st.tab.o 
	make lex.students.o
	

parser : parser.l parser.y
	yacc -d -p students -b st parser.y
	lex -P students parser.l

st.tab.o : st.tab.c st.tab.h
	gcc -c st.tab.c

lex.students.o : st.tab.h lex.students.c
	gcc -c lex.students.c

test : test.c
	gcc test.c -o exe lex.students.o st.tab.o ../../../util/lists/array-list.o ../../../util/lists/linked-list.o ../../../data/student.o ../../../io/logs/logSystem.o

clean:
	rm -f st.tab.*
	rm -f lex.students.*
	rm -f exe*
